﻿using System;

namespace VoiceLocal
{

    public partial class QisrDll
    {

        /// __QISR_H__ -> 
        /// Error generating expression: 值不能为空。
        ///参数名: node
        public const string @__QISR_H__ = "";

        /// MSPAPI -> __stdcall
        /// Error generating expression: Value __stdcall is not resolved
        public const string MSPAPI = "msc.dll";
    }

    public enum Anonymous_51e2b62b_6a3e_4b6b_9cc6_e0ce007fb208
    {

        /// MSP_AUDIO_SAMPLE_INIT -> 0x00
        MSP_AUDIO_SAMPLE_INIT = 0,

        /// MSP_AUDIO_SAMPLE_FIRST -> 0x01
        MSP_AUDIO_SAMPLE_FIRST = 1,

        /// MSP_AUDIO_SAMPLE_CONTINUE -> 0x02
        MSP_AUDIO_SAMPLE_CONTINUE = 2,

        /// MSP_AUDIO_SAMPLE_LAST -> 0x04
        MSP_AUDIO_SAMPLE_LAST = 4,
    }

    public enum Anonymous_0947058b_6f79_435b_ad41_a9d5d39d3c2b
    {

        /// MSP_REC_STATUS_SUCCESS -> 0
        MSP_REC_STATUS_SUCCESS = 0,

        /// MSP_REC_STATUS_NO_MATCH -> 1
        MSP_REC_STATUS_NO_MATCH = 1,

        /// MSP_REC_STATUS_INCOMPLETE -> 2
        MSP_REC_STATUS_INCOMPLETE = 2,

        /// MSP_REC_STATUS_NON_SPEECH_DETECTED -> 3
        MSP_REC_STATUS_NON_SPEECH_DETECTED = 3,

        /// MSP_REC_STATUS_SPEECH_DETECTED -> 4
        MSP_REC_STATUS_SPEECH_DETECTED = 4,

        /// MSP_REC_STATUS_COMPLETE -> 5
        MSP_REC_STATUS_COMPLETE = 5,

        /// MSP_REC_STATUS_MAX_CPU_TIME -> 6
        MSP_REC_STATUS_MAX_CPU_TIME = 6,

        /// MSP_REC_STATUS_MAX_SPEECH -> 7
        MSP_REC_STATUS_MAX_SPEECH = 7,

        /// MSP_REC_STATUS_STOPPED -> 8
        MSP_REC_STATUS_STOPPED = 8,

        /// MSP_REC_STATUS_REJECTED -> 9
        MSP_REC_STATUS_REJECTED = 9,

        /// MSP_REC_STATUS_NO_SPEECH_FOUND -> 10
        MSP_REC_STATUS_NO_SPEECH_FOUND = 10,

        /// MSP_REC_STATUS_FAILURE -> MSP_REC_STATUS_NO_MATCH
        MSP_REC_STATUS_FAILURE = MSP_REC_STATUS_NO_MATCH,
    }

    public enum Anonymous_5017e8f0_87f2_459b_8212_fdebd411a8ff
    {

        /// MSP_EP_LOOKING_FOR_SPEECH -> 0
        MSP_EP_LOOKING_FOR_SPEECH = 0,

        /// MSP_EP_IN_SPEECH -> 1
        MSP_EP_IN_SPEECH = 1,

        /// MSP_EP_AFTER_SPEECH -> 3
        MSP_EP_AFTER_SPEECH = 3,

        /// MSP_EP_TIMEOUT -> 4
        MSP_EP_TIMEOUT = 4,

        /// MSP_EP_ERROR -> 5
        MSP_EP_ERROR = 5,

        /// MSP_EP_MAX_SPEECH -> 6
        MSP_EP_MAX_SPEECH = 6,

        /// MSP_EP_IDLE -> 7
        MSP_EP_IDLE = 7,
    }

    public enum Anonymous_68145e30_8685_4cbb_9dc5_a9a6cc2f2673
    {

        /// MSP_TTS_FLAG_STILL_HAVE_DATA -> 1
        MSP_TTS_FLAG_STILL_HAVE_DATA = 1,

        /// MSP_TTS_FLAG_DATA_END -> 2
        MSP_TTS_FLAG_DATA_END = 2,

        /// MSP_TTS_FLAG_CMD_CANCELED -> 4
        MSP_TTS_FLAG_CMD_CANCELED = 4,
    }

    public enum Anonymous_cb58a757_1c25_426a_a74a_8f042eefd1e2
    {

        /// MSP_HCR_DATA_FIRST -> 1
        MSP_HCR_DATA_FIRST = 1,

        /// MSP_HCR_DATA_CONTINUE -> 2
        MSP_HCR_DATA_CONTINUE = 2,

        /// MSP_HCR_DATA_END -> 4
        MSP_HCR_DATA_END = 4,
    }

    public enum Anonymous_5c4d8660_0f19_4d4c_a923_617092248813
    {

        /// MSP_IVW_MSG_WAKEUP -> 1
        MSP_IVW_MSG_WAKEUP = 1,

        /// MSP_IVW_MSG_ERROR -> 2
        MSP_IVW_MSG_ERROR = 2,

        /// MSP_IVW_MSG_ISR_RESULT -> 3
        MSP_IVW_MSG_ISR_RESULT = 3,

        /// MSP_IVW_MSG_ISR_EPS -> 4
        MSP_IVW_MSG_ISR_EPS = 4,

        /// MSP_IVW_MSG_VOLUME -> 5
        MSP_IVW_MSG_VOLUME = 5,

        /// MSP_IVW_MSG_ENROLL -> 6
        MSP_IVW_MSG_ENROLL = 6,

        /// MSP_IVW_MSG_RESET -> 7
        MSP_IVW_MSG_RESET = 7,
    }

    public enum Anonymous_a21ffe1b_d2ac_42f2_8fa0_83631ccdfd42
    {

        /// MSP_DATA_SAMPLE_INIT -> 0x00
        MSP_DATA_SAMPLE_INIT = 0,

        /// MSP_DATA_SAMPLE_FIRST -> 0x01
        MSP_DATA_SAMPLE_FIRST = 1,

        /// MSP_DATA_SAMPLE_CONTINUE -> 0x02
        MSP_DATA_SAMPLE_CONTINUE = 2,

        /// MSP_DATA_SAMPLE_LAST -> 0x04
        MSP_DATA_SAMPLE_LAST = 4,
    }

    /// Return Type: char*
    ///grammarList: char*
    ///params: char*
    ///result: int*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate System.IntPtr Proc_QISRSessionBegin([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string grammarList, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string @params, ref int result);

    /// Return Type: int
    ///sessionID: char*
    ///waveData: void*
    ///waveLen: unsigned int
    ///audioStatus: int
    ///epStatus: int*
    ///recogStatus: int*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRAudioWrite([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, System.IntPtr waveData, uint waveLen, int audioStatus, ref int epStatus, ref int recogStatus);

    /// Return Type: char*
    ///sessionID: char*
    ///rsltStatus: int*
    ///waitTime: int
    ///errorCode: int*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate System.IntPtr Proc_QISRGetResult([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, ref int rsltStatus, int waitTime, ref int errorCode);

    /// Return Type: char*
    ///sessionID: char*
    ///rsltLen: unsigned int*
    ///rsltStatus: int*
    ///waitTime: int
    ///errorCode: int*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate System.IntPtr Proc_QISRGetBinaryResult([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, ref uint rsltLen, ref int rsltStatus, int waitTime, ref int errorCode);

    /// Return Type: int
    ///sessionID: char*
    ///hints: char*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRSessionEnd([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string hints);

    /// Return Type: int
    ///sessionID: char*
    ///paramName: char*
    ///paramValue: char*
    ///valueLen: unsigned int*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRGetParam([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramName, System.IntPtr paramValue, ref uint valueLen);

    /// Return Type: int
    ///sessionID: char*
    ///paramName: char*
    ///paramValue: char*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRSetParam([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramName, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramValue);

    /// Return Type: void
    ///sessionID: char*
    ///result: char*
    ///resultLen: int
    ///resultStatus: int
    ///userData: void*
    public delegate void recog_result_ntf_handler([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string result, int resultLen, int resultStatus, System.IntPtr userData);

    /// Return Type: void
    ///sessionID: char*
    ///type: int
    ///status: int
    ///param1: int
    ///param2: void*
    ///userData: void*
    public delegate void recog_status_ntf_handler([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, int type, int status, int param1, System.IntPtr param2, System.IntPtr userData);

    /// Return Type: void
    ///sessionID: char*
    ///errorCode: int
    ///detail: char*
    ///userData: void*
    public delegate void recog_error_ntf_handler([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, int errorCode, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string detail, System.IntPtr userData);

    /// Return Type: int
    ///param0: int
    ///param1: char*
    ///param2: void*
    public delegate int UserCallBack(int param0, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string param1, System.IntPtr param2);

    /// Return Type: int
    ///param0: int
    ///param1: char*
    ///param2: void*
    public delegate int GrammarCallBack(int param0,
        [System.Runtime.InteropServices.In]
        [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)]
        string param1,
        System.IntPtr param2);

    /// Return Type: int
    ///param0: int
    ///param1: char*
    ///param2: void*
    public delegate int LexiconCallBack(int param0, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string param1, System.IntPtr param2);

    /// Return Type: int
    ///grammarType: char*
    ///grammarContent: char*
    ///grammarLength: unsigned int
    ///params: char*
    ///callback: GrammarCallBack
    ///userData: void*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRBuildGrammar([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string grammarType, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string grammarContent, uint grammarLength, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string @params, GrammarCallBack callback, System.IntPtr userData);

    /// Return Type: int
    ///lexiconName: char*
    ///lexiconContent: char*
    ///lexiconLength: unsigned int
    ///params: char*
    ///callback: LexiconCallBack
    ///userData: void*
    [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate int Proc_QISRUpdataLexicon([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lexiconName, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lexiconContent, uint lexiconLength, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string @params, LexiconCallBack callback, System.IntPtr userData);

    public partial class QisrDll
    {

        /// Return Type: char*
        ///grammarList: char*
        ///params: char*
        ///errorCode: int*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRSessionBegin", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern IntPtr QISRSessionBegin([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string grammarList, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string @params, ref int errorCode);


        /// Return Type: int
        ///sessionID: char*
        ///waveData: void*
        ///waveLen: unsigned int
        ///audioStatus: int
        ///epStatus: int*
        ///recogStatus: int*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRAudioWrite", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRAudioWrite([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, byte[] waveData, uint waveLen, int audioStatus, ref int epStatus, ref int recogStatus);


        /// Return Type: char*
        ///sessionID: char*
        ///rsltStatus: int*
        ///waitTime: int
        ///errorCode: int*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRGetResult", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern System.IntPtr QISRGetResult([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, ref int rsltStatus, int waitTime, ref int errorCode);


        /// Return Type: char*
        ///sessionID: char*
        ///rsltLen: unsigned int*
        ///rsltStatus: int*
        ///waitTime: int
        ///errorCode: int*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRGetBinaryResult", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern System.IntPtr QISRGetBinaryResult([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, ref uint rsltLen, ref int rsltStatus, int waitTime, ref int errorCode);


        /// Return Type: int
        ///sessionID: char*
        ///hints: char*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRSessionEnd", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRSessionEnd([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string hints);


        /// Return Type: int
        ///sessionID: char*
        ///paramName: char*
        ///paramValue: char*
        ///valueLen: unsigned int*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRGetParam", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRGetParam([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramName, System.IntPtr paramValue, ref uint valueLen);


        /// Return Type: int
        ///sessionID: char*
        ///paramName: char*
        ///paramValue: char*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRSetParam", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRSetParam([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramName, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string paramValue);


        /// Return Type: int
        ///sessionID: char*
        ///rsltCb: recog_result_ntf_handler
        ///statusCb: recog_status_ntf_handler
        ///errCb: recog_error_ntf_handler
        ///userData: void*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRRegisterNotify", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRRegisterNotify([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sessionID, recog_result_ntf_handler rsltCb, recog_status_ntf_handler statusCb, recog_error_ntf_handler errCb, System.IntPtr userData);


        /// Return Type: int
        ///grammarType: char*
        ///grammarContent: char*
        ///grammarLength: unsigned int
        ///params: char*
        ///callback: GrammarCallBack
        ///userData: void*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRBuildGrammar",
            CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRBuildGrammar(
            [System.Runtime.InteropServices.In]
            [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)]
            string grammarType,
            [System.Runtime.InteropServices.In]
            [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)]
            string grammarContent, int grammarLength,
            [System.Runtime.InteropServices.In]
            [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)]
            string @params, GrammarCallBack callback,  System.IntPtr userData);


        /// Return Type: int
        ///lexiconName: char*
        ///lexiconContent: char*
        ///lexiconLength: unsigned int
        ///params: char*
        ///callback: LexiconCallBack
        ///userData: void*
        [System.Runtime.InteropServices.DllImport(MSPAPI, EntryPoint = "QISRUpdateLexicon", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern int QISRUpdateLexicon([System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lexiconName, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lexiconContent, uint lexiconLength, [System.Runtime.InteropServices.In] [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string @params, LexiconCallBack callback, System.IntPtr userData);

    }

}
